package com.jcourse.bookstore;
import java.util.Scanner;
import java.util.HashMap;
import java.util.Map;

public class MapCourse {

	public static void main(String[] args) {
		Map<String,Integer> scores = new HashMap<String,Integer>();
		Scanner scan  = new Scanner(System.in);
		for(int i = 0;i<5;i++){
			System.out.println("Please input course name:");
			boolean exit= false;
			String name= "";
			while(true){
				name=scan.nextLine();
				if(!name.trim().equals(""))
					if(name.equals("exit"))
					{
						exit = true;
						break;
					}
					break;
			}
			if(exit)
				break;
			//String name =scan.nextLine();
			System.out.println("Please input score of this course:");
			int score = scan.nextInt();
			scores.put(name,score);
		}


		System.out.println(scores);
	}

}
